from rest_framework.views import APIView
from rest_framework.response import Response

from django_redis import get_redis_connection


# class Index(APIView):
#     def get(self,request):
#         a = 100/0
#         return Response({'msg':'ok'})


# class IndexViews(APIView):
#     def get(self,request):
#     	# 获取reids默认连接对象
#         reids_conn = get_redis_connection('default')
# 		# 执行reids获取string数据类型的指令
#         name = reids_conn.get('name')
#
#         print(name)
#         # a = 100/0
#         return Response({'message':'请求成功'})














